package com.sh.data.engine.domain.normalization.modeldesign.dimfact.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sh.data.engine.domain.normalization.modeldesign.busmatrix.model.domain.BusMatrixDomain;
import com.sh.data.engine.domain.normalization.modeldesign.dimfact.model.domain.GetTableNameDomain;
import com.sh.data.engine.domain.normalization.modeldesign.dimfact.model.domain.ModelBindWarnDomain;
import com.sh.data.engine.domain.normalization.modeldesign.dimfact.model.param.DeleteDimFactParam;
import com.sh.data.engine.domain.normalization.modeldesign.dimfact.model.param.SaveDimFactParam;
import com.sh.data.engine.domain.normalization.modeldesign.dimfact.model.param.SaveNewDimFactParam;
import com.sh.data.engine.repository.dao.normalization.modeldesign.dimfact.entity.DimFactEntity;
import org.springframework.data.util.Pair;

import java.util.List;

/**
 * @author : changkong
 * @date : 2022/1/12
 */
public interface DimFactService extends IService<DimFactEntity> {

    BusMatrixDomain deleteFactRow(DeleteDimFactParam deleteDimFactParam);

    BusMatrixDomain deleteDimCol(DeleteDimFactParam deleteDimFactParam);

    // 新建事实行
    BusMatrixDomain saveNewFactRow(SaveNewDimFactParam saveNewDimFactParam);

    BusMatrixDomain saveNewDimCol(SaveNewDimFactParam saveNewDimFactParam);

    Pair<List<DimFactEntity>, List<DimFactEntity>> fullFetchDimFactsAndPartByType(Long themeId);

    List<DimFactEntity> getDimColAndFactRowByThemeId(Long themeId);

    GetTableNameDomain getTableNameById(Long projectId, String type, Long id);

    BusMatrixDomain saveDimFact(SaveDimFactParam saveDimFactParam);

    ModelBindWarnDomain getBindDimFact(Long modelId);

    DimFactEntity getByModelId(Long modelId);

    DimFactEntity getByPrimaryKey(Long id);
}
